Completed
Pull Request — master (#90)
by Janis
12:20
created

$(document).ready   B

Complexity

Conditions 5
Paths 4

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 8.8571
c 0
b 0
f 0
cc 5
nc 4
nop 0
1
/**
2
 * nextCloud - ocr
3
 *
4
 * This file is licensed under the Affero General Public License version 3 or
5
 * later. See the COPYING file.
6
 *
7
 * @author Janis Koehr <[email protected]>
8
 * @copyright Janis Koehr 2017
9
 */
10
(function (OC, OCA, window, $) {
11
	'use strict';
12
    /**
13
	 * Init the App
14
	 */
15
	$(document).ready(function () {
16
		/** We have to be in the Files App! */
17
		if (!OCA.Files || !OCA.Files.App.fileList) {
18
			return;
19
		}
20
		/** Escape when the requested file is public.php */
21
		if (/(public)\.php/i.exec(window.location.href) !== null) {
22
			return;
23
		}
24
		/** Check for namespace Ocr */
25
		if (!OCA.Ocr) {
26
			return;
27
		}
28
		// Create instance
29
		OCA.Ocr.$app = new OCA.Ocr.App();
30
		
31
		OCA.Ocr.$app.init();
32
33
	});
34
    	/** global: OC, OCA */
35
})(OC, OCA, window, jQuery);
36